function uipreview_MakeImage( ax )
%UIPREVIEW_MAKEIMAGE Summary of this function goes here
%   Detailed explanation goes here

[fig, vid] = dhaqtool;
frame = getsnapshot(vid);
h=image( frame, 'parent', ax , 'tag', 'uipreview');
setappdata(h, 'UpdatePreviewWindowFcn', @uipreview_UpdateFcn)

% Look for PlugIns with preview update callbacks
PluginFiles= getappdata(fig, 'PluginFiles');
PluginCount= getappdata(fig, 'PluginCount');

% Registrate all update listeners
[Callback_List Callback_Count]= plugins_ParseFcn(PluginFiles, PluginCount, 'preview', 'Update');
UpdateCallbacks(1)= {Callback_List};
UpdateCallbacks(2)= {Callback_Count};
setappdata(h, 'UpdateCallbacks', UpdateCallbacks);

[Callback_List Callback_Count]= plugins_ParseFcn(PluginFiles, PluginCount, 'preview', 'ImageCreated');
for i=1:Callback_Count
    eval(Callback_List{i});
end

end

